package com.bnyy.message.bean.chat.message_data;

import com.bnyy.message.enums.MessageType;
import com.google.gson.JsonObject;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

/**
 * Author : 关炳鹏
 * Description :
 * Date : 2023/1/6
 **/
@Table(name = "message_group_chat_vote")
public class GroupChatVoteMessage extends MessageData {

    interface ColumnName {
        String TITLE = "title";
        String SUBJECT = "subject";
        String VOTE_ID = "vote_id";
    }

    @Column(name = ColumnName.SUBJECT)
    private String subject;
    @Column(name = ColumnName.TITLE)
    private String title;
    @Column(name = ColumnName.VOTE_ID)
    private int vote_id;

    public GroupChatVoteMessage() {
    }

    public GroupChatVoteMessage(String msgId, JsonObject jsonObject) {
        super(msgId, jsonObject);

        this.subject = jsonObject.get(ColumnName.SUBJECT).getAsString();
        this.title = jsonObject.get(ColumnName.TITLE).getAsString();
        this.vote_id = jsonObject.get(ColumnName.VOTE_ID).getAsInt();
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getVote_id() {
        return vote_id;
    }

    public void setVote_id(int vote_id) {
        this.vote_id = vote_id;
    }

    @Override
    public MessageType getMessageType() {
        return MessageType.GROUP_CHAT_VOTE;
    }
}
